package com.yejiali.backend.entity.vo;

import com.yejiali.backend.entity.MedicalCase;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import org.springframework.data.mongodb.core.mapping.Field;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @Author:yejiali
 * @Date:2025/6/3-06-03-14:33
 * @Decsription:com.yejiali.backend.entity.vo
 * @Version:1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class MedicalCaseInfoVo {

    private String id; // MongoDB 自动生成的主键
    private Long patientId; // 病人唯一标识
    private String patientName; // 病人姓名
    private Integer sex;//性别：0-男 1-女
    private Date birthDate;; // 病人年龄
    private String auditStatus; // 待审核、已初审核、初审驳回，二审驳回
    private Date uploadTime; // ISO 8601 格式时间
    private String caseStatus; // 进行中、已结案、已归档
    private List<MedicalCase.Attachment> attachments; // 附件列表
    private String medicalHistory; // 文本描述
    private String department; // 血液科、眼科、内科等
    private Map<String, Object> testResults; // 动态检测数据
    private String symptomDescription; // 文本描述
    private String diagnosis; // 文本诊断结论

    // 嵌套类：附件信息
    @Data
    public static class Attachment {
        @Field("文件名")
        private String fileName;

        @Field("上传时间")
        private Date uploadTime;

        @Field("URL")
        private String url;

    }
}
